home *** CD-ROM | disk | FTP | other *** search
- on checkit
- global partnum, changer, TRIAL, partlist, takeinput, rumproast, firstcursor, TxtCursor, remember
- set golem to getAt(partlist, partnum)
- set takeinput to 0
- if changer = golem then
- victory()
- else
- puppetSound(0)
- set remember to the castNum of sprite 3
- switch(11, 3)
- puppetSprite(3, 0)
- set changer to EMPTY
- set TxtCursor to 21 + ((partnum - 1) * 2)
- set the castNum of sprite (21 + ((partnum - 1) * 2)) to firstcursor
- set the castNum of sprite (22 + ((partnum - 1) * 2)) to the number of cast "digit_"
- set TRIAL to TRIAL + 1
- if TRIAL = 1 then
- play frame "hint1"
- else
- play frame "hint2"
- end if
- puppetSprite(11, 0)
- go(rumproast)
- end if
- end
-
- on switch snew, sold
- sactivate(snew, sinfo(sold))
- end
-
- on sinfo snew
- set stuff to []
- add(stuff, the castNum of sprite snew)
- add(stuff, the locH of sprite snew)
- add(stuff, the locV of sprite snew)
- add(stuff, the blend of sprite snew)
- add(stuff, the foreColor of sprite snew)
- add(stuff, the ink of sprite snew)
- add(stuff, the type of sprite snew)
- return stuff
- end
-
- on sactivate snew, stuff
- puppetSprite(snew, 1)
- set the castNum of sprite snew to getAt(stuff, 1)
- set the locH of sprite snew to getAt(stuff, 2)
- set the locV of sprite snew to getAt(stuff, 3)
- set the blend of sprite snew to getAt(stuff, 4)
- set the foreColor of sprite snew to getAt(stuff, 5)
- set the ink of sprite snew to getAt(stuff, 6)
- set the type of sprite snew to getAt(stuff, 7)
- end
-
- on blinkwrong
- global partlist, partnum
- startTimer()
- repeat while the timer < 120
- set the foreColor of sprite getPropAt(partlist, partnum) to 0
- updateStage()
- mydelay(10)
- set the foreColor of sprite getPropAt(partlist, partnum) to 255
- updateStage()
- mydelay(10)
- end repeat
- end
-
- on mydelay dtime
- set stime to the timer
- repeat while the timer < (stime + dtime)
- updateStage()
- end repeat
- end
-
- on startMovie
- global castnumber, firstcursor, takeinput, lastcursor
- set takeinput to 0
- set firstcursor to the number of cast "firstcursor"
- set lastcursor to the number of cast "lastcursor"
- set castnumber to []
- repeat with xxx = 0 to 9
- add(castnumber, the number of cast ("digit" & xxx))
- end repeat
- add(castnumber, the number of cast "ones")
- add(castnumber, the number of cast "digit_")
- repeat with xxx = 1 to 48
- set the visible of sprite xxx to 1
- end repeat
- end
-
- on stopMovie
- repeat with xxx = 1 to 48
- set the visible of sprite xxx to 1
- end repeat
- end
-
- on victory
- global partnum, chib, changer, TRIAL, bugeyesx, bugeyesy, lastrand
- set TRIAL to 0
- set changer to EMPTY
- set partnum to partnum + 1
- if partnum > 6 then
- puppetSound(0)
- repeat with xxy = 3 to 10
- puppetSprite(xxy, 1)
- end repeat
- puppetSprite(19, 1)
- set the locH of sprite 19 to bugeyesx - 7
- updateStage()
- set thisrand to random(6)
- repeat while lastrand = thisrand
- set thisrand to random(6)
- end repeat
- play frame "reward" & thisrand
- set lastrand to thisrand
- repeat with xxy = 3 to 10
- puppetSprite(xxy, 0)
- end repeat
- puppetSprite(19, 0)
- go("start")
- else
- puppetSound("correct" & random(4))
- updateStage()
- go("bugs" & chib)
- end if
- end
-